with Rational_Numbers.Components;
with Rational_Numbers.Reduce;
--------------------------------------------------------------------------------
--                                                                            --
--        R A T I O N A L _ N U M B E R S . C O M P O N E N T S               --
--                                                                            --
--                                  S p e c                                   --
--                                                                            --
--------------------------------------------------------------------------------
package body Rational_Numbers.Components is

   function Numerator (R : Rational) return Integer  is
      Res : Rational;
   begin
      Res := Reduce(R);
      return Res.Numerator;
   end Numerator;

   function Denominator (R : Rational) return Positive is
   Res : Rational;
   begin
      Res := Reduce(R);
      return Res.Denominator;
   end Denominator;


end Rational_Numbers.Components;
